home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / library / rqtlsusr.lha / ReqTools / RTPatch / RTPatch.doc < prev    next >
Text File  |  1995-12-20  |  20KB  |  459 lines

  1.  
  2.                       *********************************
  3.  
  4.                          RTPatch 1.4
  5.  
  6.                          The ReqTools Patcher
  7.  
  8.                          (c) 1992-1994 Nico François
  9.                                   1995 Magnus Holmgren
  10.  
  11.                       *********************************
  12.  
  13.  
  14. Preface
  15. =======
  16.  
  17. The programs and files in this distribution are freely distributable, but are
  18. also copyright (c) Nico François. They may be freely distributed as long as
  19. no more than a nominal fee is charged to cover time and copying costs.
  20.    No commercial usage is permitted without written permission from the
  21. author.  Everything in this distribution must be kept together, in original
  22. unmodified form.
  23.    The above is generally known as freeware.
  24.  
  25.    If you have suggestions or remarks about this program, or if you find
  26. any bugs, please let me know.
  27.  
  28.    Contacting the author:
  29.  
  30.      Fido:     2:292/603.10 (Nico Francois)
  31.  
  32.      Internet: nico@augfl.be
  33.  
  34.      Mail:     Nico François
  35.                Corbielaan 13
  36.                B-3060 Bertem
  37.                BELGIUM
  38.  
  39.    If you can please use e-mail.  That way you'll stand a much better chance
  40. of getting a reply quickly.
  41.  
  42.  
  43.    ----------
  44.    IMPORTANT!
  45.    ----------
  46.  
  47.    As of release 2.3 of ReqTools, the programming is made by:
  48.  
  49.      Magnus Holmgren
  50.      Kvarnbergsvägen 5
  51.      S-444 47  Stenungsund
  52.      SWEDEN
  53.  
  54.      FidoNet:  2:204/204.6  (Magnus Holmgren)
  55.  
  56.      Internet: cmh@lls.se, cmh@augs.se
  57.  
  58.    Please contact me instead, for suggestions, remarks, bug reports and the
  59. like (btw, I prefer e-mail too). If you are interested in updating RTPatch
  60. (for some reasons, I'm not really that interested in putting any large
  61. amount of work into it ;), feel free to contact me as well.
  62.  
  63.  
  64. Contents
  65. ========
  66.  
  67. 1. Introduction
  68.  
  69. 2. Usage
  70.  
  71. 3. Compatibility
  72.  
  73. 4. Controlling RTPatch
  74.  
  75.  
  76. 1. Introduction
  77. ===============
  78.  
  79.    RTPatch is a small program that will re-route functions from most popular
  80. requester libraries to ReqTools.  Libraries currently supported are Arp, Req
  81. and Asl.  RTPatch will also patch some functions in Intuition to give you
  82. improved system requesters.
  83.  
  84.    The patches RTPatch makes are these:
  85.  
  86.      o Intuition  : AutoRequest and EasyRequest (on 2.0) are patched so
  87.                     normal system requesters, like 'Insert Disk...'
  88.                     requesters, will be replaced by ReqTools EZRequesters.
  89.                     They will appear near the mouse pointer and respond to
  90.                     many keyboard shortcuts.  On 2.0 OpenScreenTagList() is
  91.                     also patched to always open a new-look 3D screen.  This
  92.                     will make for example CygnusEd 2.12 open a nice new-look
  93.                     screen.  You may also ask RTPatch to patch OpenScreen()
  94.                     to open _all_ screens with a 3D look.  Beware however
  95.                     that this makes a lot of old programs look ugly!
  96.      o req.library: File requester, font requester, palette requester,
  97.                     string requester and integer requester are replaced by
  98.                     ReqTools requesters.
  99.      o arp.library: File requester is replaced by ReqTools file requester.
  100.      o asl.library: Currently only file requester is replaced by ReqTools
  101.                     file requester.  Font and screen mode requesters are not
  102.                     patched yet.
  103.  
  104.    RTPatch uses an intelligent patch mechanism.  It will only patch a
  105. library when it is actually opened.  This means that if you never use the
  106. arp.library (for example) it will not be patched and, more importantly, it
  107. will not unnecessaryly be loaded into memory!  If you do run a program that
  108. uses Arp and you quit it, it will close Arp.  RTPatch will then allow the
  109. patched Arp to be expunged from memory.  If Arp is reloaded again later it
  110. will be re-patched.  Note that RTPatch patches exec.library/OpenLibrary() and
  111. exec.library/OldOpenLibrary() to accomplish all this.
  112.  
  113.    RTPatch is a 100% assembly program, for maximum efficiency.  It only
  114. takes about 5K of memory once installed (excluding memory occupied by
  115. reqtools.library).  It uses *NO* processor time while installed.
  116.  
  117.  
  118. 2. Usage
  119. ========
  120.  
  121.    RTPatch can be used from Workbench and from the Shell (CLI).
  122.  
  123.    Shell usage:
  124.    ~~~~~~~~~~~~
  125.      RTPatch 1.3 © 1992-1994 Nico François
  126.      Usage: RTPatch [NOREQ] [NOASL] [NOARP] [NOINTUITION] [OPENSCRPATCH]
  127.                     [NOOPENSCRTAGPATCH] [NOFILEREQPATCH] [IGNOREHEIGHT]
  128.  
  129.    Explanation of options:
  130.  
  131.       NOREQ             : Do not patch req.library.
  132.       NOASL             : Do not patch asl.library.
  133.       NOARP             : Do not patch arp.library.
  134.       NOINTUITION       : Do not patch intuition.library.
  135.       OPENSCRPATCH      : Patch OpenScreen() in intuition.library so _all_
  136.                           screens will open with a 3D look.  Only use this
  137.                           option on Kickstart 2.0 and higher!
  138.       NOOPENSCRTAGPATCH : Do not patch OpenScreenTagList() in
  139.                           intuition.library.
  140.       NOFILEREQPATCH    : Do not patch any file requester functions.
  141.       IGNOREHEIGHT      : Ignore height setting of Asl file requester.
  142.  
  143.    Workbench usage:
  144.    ~~~~~~~~~~~~~~~~
  145.    RTPatch recognizes following tooltypes:
  146.  
  147.       NOREQ             : Do not patch req.library.
  148.       NOASL             : Do not patch asl.library.
  149.       NOARP             : Do not patch arp.library.
  150.       NOINTUITION       : Do not patch intuition.library.
  151.       OPENSCRPATCH      : Patch OpenScreen() in intuition.library so _all_
  152.                           screens will open with a 3D look.  Only use this
  153.                           tooltype on Kickstart 2.0 and higher!
  154.       NOOPENSCRTAGPATCH : Do not patch OpenScreenTagList() in
  155.                           intuition.library.
  156.       NOFILEREQPATCH    : Do not patch any file requester functions.
  157.       IGNOREHEIGHT      : Ignore height setting of Asl file requester.
  158.       QUIET             : Don't open requester informing patches have been
  159.                           installed.  Set this tooltype if you intend to drag
  160.                           RTPatch to your WbStartup drawer.
  161.  
  162. NOTE: Run RTPatch when *NO* program has req.library, asl.library or
  163.       arp.library open!  RTPatch will complain if one of these libraries
  164.       is in use and will refuse to install or remove patches.  Running
  165.       RTPatch in your user-startup or from your WbStartup should be ok.
  166.  
  167. WARNING: Asl V38 (distributed with Workbench 2.1) always keeps its library
  168.          open count at 0.  It does this so ramlib will always call its
  169.          Expunge() function when memory is low.  This does however mean
  170.          RTPatch cannot see if this library is in use or not.  So you must
  171.          be very careful not to install or remove RTPatch when you have a
  172.          program running that uses Asl.  If you are still using Workbench 1.3
  173.          or 2.0 there is no problem.
  174.  
  175.  
  176. 3. Compatibility
  177. ================
  178.  
  179.    RTPatch supports all basic requester functions and options.  Other
  180. supported things that are worth mentioning:
  181.  
  182.      arp.library (V39)
  183.      ~~~~~~~~~~~~~~~~~
  184.      o File callback function (FRF_DoWildFunc).  The A4 global data register
  185.        is valid when this callback function is called (documented feature).
  186.      o Message callback function (FRF_DoMsgFunc) for requesters which share
  187.        their IDCMP port with the parent window.
  188.      o Save mode (FRF_DoColor flag).
  189.      o Shared IDCMP with parent window or new IDCMP (FRF_NewIDCMP flag).
  190.      o 'Empty filename is ok' behaviour is supported.
  191.  
  192.      asl.library (V36/V38-V40)
  193.      ~~~~~~~~~~~~~~~~~~~~~~~~~
  194.      o File callback function/hook (FRF_DOWILDFUNC and ASLFR_FilterFunc tag).
  195.        The A4 global data register is valid when this callback function is
  196.        called for maximum compatibility (undocumented feature of Asl V36).
  197.      o Intuition message callback function/hook (FRF_DOMSGFUNC and
  198.        ASLFR_IntuiMsgFunc tag) for requesters with shared IDCMP.
  199.      o Multi-selection (FRB_DOMULTISELECT flag or ASLFR_DoMultiSelect tag).
  200.      o Directory requester, no files. (FRF_DRAWERSONLY flag or
  201.        ASLFR_DrawersOnly tag).
  202.      o Save mode (FRF_DOSAVEMODE flag or ASLFR_DoSaveMode tag).
  203.      o Shared IDCMP with parent window or new IDCMP (FRF_PRIVATEIDCMP flag
  204.        or ALSFR_PrivateIDCMP tag).
  205.      o Putting to sleep of parent window (ASLFR_SleepWindow tag).
  206.      o Font for requester (ASLFR_TextAttr tag).  Note that if a proportional
  207.        font is supplied it will be rejected by the ReqTools file requester.
  208.      o Pattern gadget (FRF_DOPATTERNS flag or ASLFR_DoPatterns tag).
  209.      o 'Empty filename is ok' behaviour is supported to ensures compatibility
  210.        with e.g. AssignX, PageStream 2.2 and no doubt many other programs.
  211.      o Undocumented fields in file requester structure are filled in, so even
  212.        "dirty" programs will work.
  213.      o Accept and reject patterns (ASLFR_AcceptPattern/ASLFR_RejectPattern).
  214.  
  215.      req.library (V2)
  216.      ~~~~~~~~~~~~~~~~
  217.      o Multi-selection.
  218.      o Buffers for file and font requester.
  219.      o Directory requester (no files).
  220.      o Save mode (FRQSAVINGM flag).
  221.      o Minimum and maximum value of GetLong() requester.
  222.  
  223.      Additional enhancements
  224.      ~~~~~~~~~~~~~~~~~~~~~~~
  225.      o Buffered directories for Asl file requester.
  226.  
  227.  
  228.      Following things are NOT supported (yet?):
  229.                           ¯¯¯
  230.      arp.library
  231.      ~~~~~~~~~~~
  232.      o FRF_NewWindFunc and FRF_AddGadFunc/FRF_GEventFunc callback functions
  233.        are not called.  As far as I can tell nobody ever used the latter two
  234.        and the former function is certainly not used a lot.
  235.        In short: this should not pose any problems.
  236.  
  237.      asl.library
  238.      ~~~~~~~~~~~
  239.      o ASLFR_InitialWidth and ASLFR_NegativeText tags are ignored.
  240.      o FRB_REJECTICONS flag and ASLFR_RejectIcons tag are ignored.
  241.      o FRB_FILTERDRAWERS flag and ASLFR_FilterDrawers tag are ignored.
  242.  
  243.      req.library
  244.      ~~~~~~~~~~~
  245.      o Timeout and abort mask (req.library requester will be used).
  246.      o freq->frq_Hide is ignored (freq->frq_Show is however supported).
  247.      o TR_KeyMask is not completely supported.  If it is not 0xffff
  248.        (no qualifers) the requester will only respond to Left Amiga V/B.
  249.        This should suffice in most cases however.
  250.  
  251.    If you find any compatibility problems let me know.  Please give a detailed
  252. description of the problem.  Not 'RTPatch doesn't work with NeatProg',
  253. but more like: 'when I do this and this in NeatProg ... doesn't work".
  254.  
  255.  
  256. 4. Controlling RTPatch
  257. ======================
  258.  
  259.    From version 1.1 on RTPatch's message port can be used to control certain
  260. patches from an external program.
  261.  
  262.    The message port is called 'RTPatch.rendezvous' and looks like this:
  263.  
  264.    struct RTPatchPort {
  265.       /* PRIVATE FIELDS */
  266.       struct MsgPort rtport_port;
  267.       ULONG rtport_version;
  268.       /* PUBLIC */
  269.       UWORD rtport_easyreqautocancel;
  270.       UWORD rtport_skipeasyreqpatch;
  271.       UWORD rtport_skipopenscrpatch;
  272.       };
  273.  
  274.    Set the rtport_autocancel field to non-zero to make easy requesters cancel
  275. themselves automatically.  The rtport_skipeasyreqpatch field can be used to
  276. temporarily disable the patch for EasyRequestArgs().  Note that the
  277. rtport_easyreqautocancel field will be ignored if the rtport_skipeasyreqpatch
  278. field is non-zero (TRUE).  RTPatch must have been installed _without_ the
  279. NOINTUITION argument (default).
  280.  
  281.    Set the rtport_skipopenscrpatch field to non-zero to temporarily disable
  282. the OpenScreen() patch.  This will of course only work if the OPENSCRPATCH
  283. argument was used (not the default!).
  284.  
  285.    To change these fields simply do a FindPort() for 'RTPatch.rendezvous' and
  286. change the fields like this:
  287.  
  288.    Forbid();
  289.    if (rtport = (struct RTPatchPort *)FindPort ("RTPatch.rendezvous")) {
  290.       rtport->rtport_easyreqautocancel = TRUE;
  291.       }
  292.    Permit();
  293.    if (!rtport) Message ("RTPatch not found!");
  294.    else Message ("Easy requesters will now be canceled!");
  295.  
  296.    Note that you absolutely _must_ use the Forbid()/Permit() pair since
  297. RTPatch can quit at any time.
  298.  
  299.                                                        Enjoy.
  300.  
  301.  
  302.                                PROGRAM HISTORY:
  303.  
  304. *****************************************************************************
  305. RELEASE 0.9ß
  306.  
  307.     o First BETA release.
  308.  
  309. *****************************************************************************
  310. RELEASE 0.91ß
  311.  
  312.     o Bug fixes: Req GetLong requester no longer returns FALSE when you enter
  313.       the value 0 and Req file requester now properly returns full pathname.
  314.     o Now correctly patches AutoRequest when run on Kickstart 1.2/1.3.
  315.  
  316. *****************************************************************************
  317. RELEASE 1.0
  318.  
  319.     o First "real" release, big improvement over previous beta versions.
  320.     o Fixed some small bugs.
  321.     o Now only patches libraries when they are actually opened.  This saves
  322.       oodles of memory, especially when you never or rarely use certain
  323.       libraries!  Also allows patched libraries to be expunged from memory
  324.       unlike many other patchers.
  325.     o In conjunction with ReqTools V38 empty directories are now allowed for
  326.       improved compatibility.  This makes it e.g. possible to use AssignX.
  327.     o Asl (V36-V38) library is now also patched (file requester only).
  328.     o Command line arguments/icon tooltypes to set some options.
  329.  
  330. *****************************************************************************
  331. RELEASE 1.0a
  332.  
  333.     o ASLFR_AcceptPattern and ASLFR_RejectPattern tags are now supported.
  334.     o Req TextRequest() patch now handles textrequests without gadgets.
  335.       An 'Ok' gadget will be added by RTPatch.
  336.     o Bug fixed: Asl callback hook (filter function) is now only called for
  337.       files, not for directories as well.  The callback hook also makes
  338.       sure the fr_Drawer field of the Asl requester is pointing to the
  339.       current directory (only with ReqTools release 2.0b or higher!).
  340.     o Now allows you to also patch OpenScreen() to force _all_ screens to
  341.       open with a 3D look. This is not default because it makes a lot of old
  342.       programs look ugly.
  343.       WARNING: NOOPENSCRPATCH switch has been changed to NOOPENSCRTAGPATCH!
  344.     o OpenScreenTagList() patch tweeked a bit.
  345.     o On Kickstart 2.0 or higher RTPatch will now set the RNF_WILDSTAR flag
  346.       in the DOS rootnode. This allows you to use '*' as a wildcard.
  347.  
  348. *****************************************************************************
  349. RELEASE 1.0b
  350.  
  351.     o OpenScreenTagList() patch tweeked a bit more :)  Will not force a 3D
  352.       look if no taglist was supplied. Will also leave the picking of the
  353.       pens completely up to Intuition. Patch made more future-compatible :)
  354.     o Bug fix: Arp message callback function didn't work.  This caused TxEd
  355.       Plus 2.2 to crash.  Thanks to Bill Sorensen for reporting this bug.
  356.     o Fixed problem with AutoRequest() and EasyRequest() patches.  Requesters
  357.       weren't opened on the default public screen if the window argument was
  358.       NULL.  They were opened on the screen of the window in pr_WindowPtr.
  359.       Thanks to Roger Nordin for reporting this.
  360.  
  361. *****************************************************************************
  362. RELEASE 1.1
  363.  
  364.     o RTPatch's message port is now documented and allows external program
  365.       to change the behaviour of some patches.  It is now possible to let
  366.       RTPatch automatically cancel easy requesters and to temporarily switch
  367.       off the OpenScreen() patch.
  368.     o Bug fix: OpenScreen() patch now recognizes the NS_EXTENDED flag.
  369.       Fixes problems with DPaint, DirOpus and PowerVisor.
  370.     o Handling of ASLFR_DrawersOnly tag was broken.  Fixed.
  371.     o Fixed bug in AutoRequest() patch (no longer worked on Kickstart 1.3).
  372.     o OpenLibrary() patch rewritten for (hopefully) better compatibility
  373.       with buggy programs.  Now keeps _all_ registers 100% compatible with
  374.       normal OpenLibrary() call.
  375.  
  376. *****************************************************************************
  377. RELEASE 1.1a
  378.  
  379.     o Clears EZREQF_NORETURNKEY for single-button EZRequesters (latest
  380.       release of ReqTools libraries no longer clear this automatically).
  381.  
  382. *****************************************************************************
  383. RELEASE 1.1b
  384.  
  385.     o Now properly initializes the fr_Pattern field of an emulated Asl
  386.       file requester structure.
  387.     o Fixed bug in req.library TextRequest() emulation.  Printf style
  388.       arguments were not correctly emulated.  This does not fix the infamous
  389.       CygnusEd bug that occurs when a search for '%s' fails (for example).
  390.     o Fixed small bug in single-button detection code in req.library
  391.       TextRequest() emulation.
  392.  
  393. *****************************************************************************
  394. RELEASE 1.1c
  395.  
  396.     o OpenLibrary() patch fixed.  Now checks the return code from
  397.       SetFunction() rather than directly peeking into the library's jump
  398.       table. Should work perfectly with SetMan now.
  399.  
  400. *****************************************************************************
  401. RELEASE 1.2
  402.  
  403.     o New argument: 'NOFILEREQPATCH'.  Allows you to switch off the patching
  404.       of all file requester functions.
  405.     o Bug fix: EasyRequestArgs() emulation had a bug in the taglist
  406.       generation.  Amazing this actually worked before ;-)
  407.     o AutoRequest() patch will now check the body text is is passed to
  408.       sniff out possible emulation problems.  In such a case the original
  409.       AutoRequest() is called.  This fixes a problem with the DiskSalv 2
  410.       device info requester.
  411.       
  412. *****************************************************************************
  413. RELEASE 1.3
  414.  
  415.     o ASL Intuition message callback function/hook (FRF_DOMSGFUNC and
  416.       ASLFR_IntuiMsgFunc tags) seems to require filtered Intuition messages
  417.       (GadTools) instead of normal IntuiMessages.  RTPatch now uses
  418.       GT_FilterIMsg() and GT_PostFilterIMsg() in its message callback hook
  419.       emulation to support this strange requirement.  On top of this some
  420.       software (e.g. PhotoWorX) seems to rely on the fr_Drawer and fr_File
  421.       fields to be valid and up-to-date during the execution of the hook.
  422.       In combination with ReqTools 2.2 this will now be the case.
  423.     o New argument: 'IGNOREHEIGHT'.  When this is switch is used RTPatch
  424.       will ignore the height setting for the Asl file requester and will
  425.       always use the default ReqTools setting (as set by the ReqTools
  426.       preferences program).
  427.     o In case of a multiselect ASL requester RTPatch will always fill in
  428.       the fr_File field with the name of the first file that was selected.
  429.       This is not really required, but improves compatibility with Term.
  430.     o Set mp_SigTask of dummy message port to NULL and mp_Flags to PA_IGNORE.
  431.       This is done to avoid all sorts of problems with some system snoopers.
  432.  
  433. *****************************************************************************
  434. RELEASE 1.4
  435.  
  436.     o Forgot to bump version number in the ReqTools 2.3 release. :)
  437.     o Increased compatibility for the ASL patch, so that e.g. Visage should
  438.       work better (i.e. not throw up an odd requester when requester is
  439.       cancelled).
  440.     o Fixed a bug in the 2.3 release that made RTPatch print way too much
  441.       text most of the time.
  442.  
  443. *****************************************************************************
  444.  
  445. RTPatch 1.4 written by Nico François (Yes, Nico is my first name :-)
  446.  
  447.  
  448. "Is that you Mo-Dean?
  449.  It's me Mo-Dean
  450.  The Interdimensional outer space being" - The B-52's
  451.  
  452.  
  453. (c) 1992-1994 Nico François
  454.          1995 Magnus Holmgren
  455.  
  456.                                    //
  457.                        Thanks to \X/ Amiga for being the best computer ever!
  458.  
  459.